package com.fm.cotroller;

import com.fm.common.ResultResponse;
import com.fm.pojo.Feedback;
import com.fm.service.IFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 用户反馈
 */
@Controller
@RequestMapping("feedback")
public class FeedbackController {

    @Autowired
    private IFeedbackService feedbackService;

    //用户添加反馈信息
    @RequestMapping(value = "add", method = RequestMethod.POST)
    @ResponseBody
    public ResultResponse<String> addFeedback(Feedback feedback){
        return feedbackService.addFeedback(feedback);
    }

    //删除反馈
    @RequestMapping(value = "del",method = RequestMethod.GET)
    public ResultResponse<String> delFeedback(String feedbackId){
        return feedbackService.delFeedback(feedbackId);
    }

    //管理员回复
    public void replyFeedback(String feedbackId,String describe){

    }

    //历史反馈列表
    @RequestMapping(value = "list")
    public void feedbackList(@RequestParam(value = "pageNum",defaultValue = "1") int pageNum,
                             @RequestParam(value = "pageSize",defaultValue = "10")int pageSize){

    }


}
